Skip to content

feat: guide agents through command help - #487

Open
angeloashmore wants to merge 6 commits into
mainfrom
claude/exp-skill-gaps-agents-all
Open

angeloashmore wants to merge 6 commits into
mainfrom
claude/exp-skill-gaps-agents-all

Conversation

@angeloashmore

@angeloashmore angeloashmore commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Resolves: prismicio/skills#14

Description

Before this PR, agents saw the CLI's agent guidance only in the top-level help. Two common problems had no guidance at all. On init, agents often stopped to ask whether to create a new repository or reuse one. A missing slice zone gave an error with no next step. The Prismic skill used to cover these, but it's being reduced to general guidance, so the CLI needs to carry them.

After this PR, agents see the AGENTS section on every command's help, and a command can add its own guidance there. init uses it to tell agents to choose without asking. The slice errors now say how to fix a missing slice zone. The human init help also explains when a repository is created. Humans never see AGENTS text.

Nuxt setup eval, Claude Code with the minimized skill:

  • Before: 18 of 24 trials finished
  • After: 21 of 21 trials finished

Checklist

  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

AGENTS
  Every command except --help, read-only ones included, needs the same
  ...
  only.

  Do not ask the user whether to create a new repository or connect an
  existing one. Use --repo only for a repository the user names, and run init.

How to QA 1


Generated by Claude Code


Note

Low Risk
Changes are limited to help text, agent-only UI, and CLI error messages; no runtime behavior change for normal command execution.

Overview
Extends CLI help so detected AI agents see an AGENTS section on every command (root, routers, and leaf commands like init), not only at the top level. Shared guidance (--task-id, --user-intent) is centralized in agentsBlock(); commands can append command-specific text via a new optional agents field on CommandConfig.

prismic init adds agent-only instructions to run init without prompting the user to choose between creating a repo vs connecting, and only use --repo when the user names a repository. Human help is unchanged (no AGENTS block).

slice connect and slice disconnect improve slice-zone errors: when a type has no slice zone, connect suggests adding one with prismic type edit-tab … --with-slice-zone; when the wrong --slice-zone is used, errors list valid slice zone field IDs.

Tests assert AGENTS placement/content for agents vs humans and the new slice error messages.

Reviewed by Cursor Bugbot for commit e0fd121. Bugbot is set up for automated code reviews on this repo. Configure here.


Generated by Claude Code

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment. ↩

…ow init picks a repository

`slice connect` now names `type edit-tab --with-slice-zone` when the type has
no slice zone, or lists the slice zones the type has. `init --help` says that
init without --repo creates a repository, and that agents pick without asking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
Make slice disconnect list the other slice zones and point to
--slice-zone, or say that the type has no slice zone. Make slice connect
say only that the type has no slice zone when it has none.

Rewrite the init help so that it states how init picks a repository,
with no instructions for agents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
Add an optional `agents` field to the command config. When the CLI
detects an agent, `--help` shows it as an AGENTS section before USAGE,
with the same format as the router AGENTS section. Humans do not see it.

Use it in `init` to tell agents not to ask the user whether to create a
new repository or connect an existing one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
Agents now see the shared AGENTS paragraph on the help of all commands,
not only on routers. When a leaf command sets `agents`, its text goes in
the same AGENTS section, after the shared paragraph and a blank line.
Routers and leaf commands use one rendering function. Router output does
not change. Humans see no AGENTS section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
Add tests for a type with no slice zone and for a --slice-zone that
matches no slice zone, in slice connect and slice disconnect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
The loop already checks the AGENTS section on the root help. Move the
--analytics-task-id check into the loop, so it also runs on the router
and leaf help.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L1dGD553PK5SyWPuV2R36u
@angeloashmore
angeloashmore marked this pull request as ready for review November 13, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add evals for the Prismic skill, then trim it to the smallest version that passes

2 participants